package web.weibo.model;

public class Comment {
    private int id;
    private String content;
    private int userId;
    private int weiboId;
    private String createdTime;
    public User commentUser;
    public Weibo commentWeibo;

    public Comment(int id, String content, int userId, int weiboId, String createdTime) {
        this.id = id;
        this.content = content;
        this.userId = userId;
        this.weiboId = weiboId;
        this.createdTime = createdTime;
    }

    public Comment() {}

    @Override
    public String toString() {
        String s = String.format(
                "(id: %s, 内容: %s, user_id: %s, 创建时间: %s)",
                this.getId(),
                this.getContent(),
                this.getUserId(),
                this.getCreatedTime()
        );
        return s;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public int getUserId() {
        return userId;
    }

    public int getWeiboId() {
        return weiboId;
    }

    public void setWeiboId(int weiboId) {
        this.weiboId = weiboId;
    }

    public String getCreatedTime() {
        return createdTime;
    }

    public User getCommentUser() {
        return commentUser;
    }

    public void setCommentUser(User commentUser) {
        this.commentUser = commentUser;
    }

    public void setCreatedTime(String createdTime) {
        this.createdTime = createdTime;
    }

    public Weibo getCommentWeibo() {
        return commentWeibo;
    }

    public void setCommentWeibo(Weibo commentWeibo) {
        this.commentWeibo = commentWeibo;
    }
}
